Skip to main content

All Questions

Tagged with
0votes
0answers
182views

Is there a known algorithm for reducing a tree based on a list of its leaves?

For a given, tree-like data structure: - Alan - Barbara - Charlie - Cecil - Brian - Chris - Candice - Cohen - Boromir - Corcoran -...
StuperUser's user avatar
7votes
2answers
632views

some misunderstanding in concept of Huffman algorithm

What is difference between Average length of codes and Average length of codewords in Huffman Algorithm? is both the same meaning? I get stuck in some facts: I see a fact that marked as False: for a ...
Emma Nic.'s user avatar
5votes
1answer
1kviews

What do I not understand about Alpha-Beta-Pruning in Chess?

I'm trying to write a chess engine, Min-Maxing works. Now I wanted to implement Alpha-Beta-Pruning, but despite reading about it and watching videos, I must have a severe misunderstanding somewhere. ...
Robert Tausig's user avatar
2votes
1answer
448views

How a Merkle tree can work with Graph data, or a better data structure

I am looking at blockchain and trying to see how Merkle trees (or perhaps Merkle DAGs) can fit to a graph data structure with circular references. For example, say I have this data model: var ...
user10869858's user avatar
1vote
0answers
76views

Decision tree for storing subscription info

I have a system in which user creates an entity. Now this entity has attributes which are dependent on many external systems. We have all those pipelines in backend which updates these entities when ...
Renjith's user avatar
2votes
1answer
378views

Algorithm: Binary Search / Tree / Partitioning on unsortable data?

First, this question is not really about binary search as I neither have sorted data, nor any sortable data at all. :-) W.r.t the "unsortable" claim see below; but I think the title term "unsortable"...
Martin Ba's user avatar
4votes
3answers
3kviews

Parallel processing a Tree on GPU

I have seen a few papers on parallel/GPU processing of trees, but after briefly looking through them I wasn't able to grasp what they did. The closest to a helpful explanation was found in ...
Lance Pollard's user avatar
1vote
1answer
72views

Efficiently determining available options based on prior selections

I'm looking for a known design pattern or algorithm that can be used to effectively determine a set of available options to be presented to a user based on previous decisions. An extremely simple ...
Kyle B.'s user avatar
3votes
3answers
577views

What strategy should I follow to draw a forest of trees represented by an array

I have an array of integers representing connectivity of nodes.Consider the following states of the array after each time it's changed: 0|1|2|3|4|5|6|7|8|9 => Root of each node is itself 0|1|2|3|3|5|...
Mikayil Abdullayev's user avatar
0votes
1answer
60views

When should an expression tree hold pointers and when should it hold values of subexpressions?

I was thinking it should hold pointers: struct Expr { string sym; Expr*[] sub; this(self, string sym) { this.sym = sym; } @property auto dup() const { auto e = ...
Daniel Donnelly's user avatar
0votes
1answer
818views

Why the search time for TreeSet is O(nlogn)?

In my naive opinion it should be O(n) in worst case since Tree could get spindly and unbalanced.
Tinyik's user avatar
-1votes
1answer
70views

How to fit k-length arrays to number of bigger arrays?

I have n number of one-dimensional arrays similar to: [0,0,0,0,0,1,1,1,0,0,1,1,...] 0's and 1's indicating occupation. And k number of smaller arrays similar to: [2,2,2], [2,2], [2], [2,2,2,2] ...
ag0702's user avatar
0votes
1answer
777views

Extract All Possible Paths from Expression-Tree and evaluate them to hold TRUE

This is a follow-up question of my previous one: https://stackoverflow.com/questions/38421950/better-class-structure-for-logical-expression-parsing-and-evaluation Brief introduction: rules as strings ...
nonsensation's user avatar
2votes
1answer
267views

Matrix multiplication range queries

I have a huge list of matrix i.e A = {M0, M1, M2 .. Mn}. I have a task to find the product of all the matrices in a given range {x,y} i.e Mx * Mx+1 * Mx+2 ... * My. I would like to know if there is ...
user328758's user avatar
0votes
2answers
2kviews

Keeping track of the number of nodes in the subtree in black and red trees

I was wondering, if I have a black and red tree and I want to keep track of the number of nodes in the subtree, what is the most effective way to do so? I mean how do I work with these values while ...
mathew7k5b's user avatar

153050per page
close